import Vue from 'vue'
import App from './App.vue'
import router from './router'
import axios from 'axios'
import Nprogress from 'nprogress'

import 'nprogress/nprogress.css'
import '@/modules/css'
import '@/css/commont.css'
import '@/modules/components'
 

axios.defaults.baseURL = `http://127.0.0.1:8888/api/private/v1/`
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  Nprogress.start()
  return config
})
axios.interceptors.response.use(config => {
  Nprogress.done()
  return config
})
Vue.prototype.axios = axios

Vue.config.productionTip = false

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
